﻿@using Critex.Helpers
@model Critex.ViewModels.DashboardModifySectionViewModel
@{
    ViewBag.Title = Model.SelectedSection.Title;
    Layout = "Shared/_DashboardLayout.cshtml";
}

<h2>
    @Model.SelectedSection.Title
</h2>
@foreach (var area1 in Model.SelectedSection.ContentAreas)
{
    <h3>
        @area1.Title
    </h3>
    Html.WriteContentAreaEditField(area1, Model.SelectedSection.Id);
}
@foreach (var category2 in Model.SelectedSection.SubSections)
{
    <h3>
        @category2.Title
    </h3>
    foreach (var area2 in category2.ContentAreas)
    {
    <h4>
        @area2.Title
    </h4>
        Html.WriteContentAreaEditField(area2, Model.SelectedSection.Id);
    }
    foreach (var category3 in category2.SubSections)
    {
    <h4>
        @category3.Title
    </h4>
        foreach (var area3 in category3.ContentAreas)
        {
    <h5>
        @area3.Title
    </h5>
            Html.WriteContentAreaEditField(area3, Model.SelectedSection.Id);
        }

    }
}